import React from 'react'
import { Link, withRouter } from 'react-router-dom'
import { inject } from 'mobx-react';

import './index.scss';


import { Input, Tooltip, Icon, Button,Modal } from 'antd';

@inject('loginStore')
class Login extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
            exitModelShow: false
        };

    }

    closeApp = () => {
        NativeApp.exitApp();
    }

    showExitModal = () => {
        this.setState({
            exitModelShow: true,
        });
    };

    exitConfirm = e => {
        this.closeApp();
    };

    closeExitModal = e => {
        this.setState({
            exitModelShow: false,
        });
    };


    render() {
        return <div className="entry_header">

            <div className="entry_header_center">

                <div className='left'>

                </div>
                <div className='mid'>

                </div>
                <div className='right'>
                    临摹系统
                </div>
            </div>

            <div className="entry_header_right">
                <Icon type="logout" style={{ fontSize: '40px', color: 'white' }} onClick={this.showExitModal} />
            </div>

            <Modal
                title="提示"
                visible={this.state.exitModelShow}
                onOk={this.exitConfirm}
                onCancel={this.closeExitModal}
                okText="确认"
                cancelText="取消"
            >
                确定退出?
                </Modal>


        </div>
    }
}

export default withRouter(Login);